package mapper;

import bean.RoomFacilitiesBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IRoomFacilitiesMapper {
    /**
     * 查询该房间的设施集合
     *
     * @param id 房间编号
     * @return 设施集合
     */
    public List<RoomFacilitiesBean> getRoomFacilities(int id);

    /**
     * 添加设施损坏记录，同时将房间状态修改为”设施损坏“
     * @param roomFacilitiesBean 损坏设施对象
     * @param roomId 房间id
     */
    public void insertDamage(@Param("roomFacilitiesBean") RoomFacilitiesBean roomFacilitiesBean, @Param("roomId") Integer roomId);
    /**
     * 将指定设施编号改为已解决
     *
     * @param id
     */
    void updateSolve(Integer id);
    /**
     * 将房间状态改为正常
     * @param roomId 房间id
     */
    void updateStatus(Integer roomId);
    /**
     * 统计未解决设施的数量
     *
     * @param roomId 房间id
     * @return 未解决总数
     */
    int solveCount(Integer roomId);
}
